Optimal. Leaf size=201 \[ \frac {a^4 \tan (c+d x)}{d}+\frac {2 a^3 b \tan ^2(c+d x)}{d}+\frac {2 b^2 \left (3 a^2+b^2\right ) \tan ^7(c+d x)}{7 d}+\frac {2 a b \left (a^2+2 b^2\right ) \tan ^6(c+d x)}{3 d}+\frac {a b \left (2 a^2+b^2\right ) \tan ^4(c+d x)}{d}+\frac {2 a^2 \left (a^2+3 b^2\right ) \tan ^3(c+d x)}{3 d}+\frac {\left (a^4+12 a^2 b^2+b^4\right ) \tan ^5(c+d x)}{5 d}+\frac {a b^3 \tan ^8(c+d x)}{2 d}+\frac {b^4 \tan ^9(c+d x)}{9 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.17, antiderivative size = 201, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 28, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.071, Rules used = {3088, 948} \[ \frac {2 b^2 \left (3 a^2+b^2\right ) \tan ^7(c+d x)}{7 d}+\frac {2 a b \left (a^2+2 b^2\right ) \tan ^6(c+d x)}{3 d}+\frac {\left (12 a^2 b^2+a^4+b^4\right ) \tan ^5(c+d x)}{5 d}+\frac {a b \left (2 a^2+b^2\right ) \tan ^4(c+d x)}{d}+\frac {2 a^2 \left (a^2+3 b^2\right ) \tan ^3(c+d x)}{3 d}+\frac {2 a^3 b \tan ^2(c+d x)}{d}+\frac {a^4 \tan (c+d x)}{d}+\frac {a b^3 \tan ^8(c+d x)}{2 d}+\frac {b^4 \tan ^9(c+d x)}{9 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 948
Rule 3088
Rubi steps
\begin {align*} \int \sec ^{10}(c+d x) (a \cos (c+d x)+b \sin (c+d x))^4 \, dx &=-\frac {\operatorname {Subst}\left (\int \frac {(b+a x)^4 \left (1+x^2\right )^2}{x^{10}} \, dx,x,\cot (c+d x)\right )}{d}\\ &=-\frac {\operatorname {Subst}\left (\int \left (\frac {b^4}{x^{10}}+\frac {4 a b^3}{x^9}+\frac {2 \left (3 a^2 b^2+b^4\right )}{x^8}+\frac {4 a b \left (a^2+2 b^2\right )}{x^7}+\frac {a^4+12 a^2 b^2+b^4}{x^6}+\frac {4 a b \left (2 a^2+b^2\right )}{x^5}+\frac {2 \left (a^4+3 a^2 b^2\right )}{x^4}+\frac {4 a^3 b}{x^3}+\frac {a^4}{x^2}\right ) \, dx,x,\cot (c+d x)\right )}{d}\\ &=\frac {a^4 \tan (c+d x)}{d}+\frac {2 a^3 b \tan ^2(c+d x)}{d}+\frac {2 a^2 \left (a^2+3 b^2\right ) \tan ^3(c+d x)}{3 d}+\frac {a b \left (2 a^2+b^2\right ) \tan ^4(c+d x)}{d}+\frac {\left (a^4+12 a^2 b^2+b^4\right ) \tan ^5(c+d x)}{5 d}+\frac {2 a b \left (a^2+2 b^2\right ) \tan ^6(c+d x)}{3 d}+\frac {2 b^2 \left (3 a^2+b^2\right ) \tan ^7(c+d x)}{7 d}+\frac {a b^3 \tan ^8(c+d x)}{2 d}+\frac {b^4 \tan ^9(c+d x)}{9 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.90, size = 115, normalized size = 0.57 \[ \frac {\frac {2}{7} \left (3 a^2+b^2\right ) (a+b \tan (c+d x))^7-\frac {2}{3} a \left (a^2+b^2\right ) (a+b \tan (c+d x))^6+\frac {1}{5} \left (a^2+b^2\right )^2 (a+b \tan (c+d x))^5+\frac {1}{9} (a+b \tan (c+d x))^9-\frac {1}{2} a (a+b \tan (c+d x))^8}{b^5 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.76, size = 167, normalized size = 0.83 \[ \frac {315 \, a b^{3} \cos \left (d x + c\right ) + 420 \, {\left (a^{3} b - a b^{3}\right )} \cos \left (d x + c\right )^{3} + 2 \, {\left (8 \, {\left (21 \, a^{4} - 18 \, a^{2} b^{2} + b^{4}\right )} \cos \left (d x + c\right )^{8} + 4 \, {\left (21 \, a^{4} - 18 \, a^{2} b^{2} + b^{4}\right )} \cos \left (d x + c\right )^{6} + 3 \, {\left (21 \, a^{4} - 18 \, a^{2} b^{2} + b^{4}\right )} \cos \left (d x + c\right )^{4} + 35 \, b^{4} + 10 \, {\left (27 \, a^{2} b^{2} - 5 \, b^{4}\right )} \cos \left (d x + c\right )^{2}\right )} \sin \left (d x + c\right )}{630 \, d \cos \left (d x + c\right )^{9}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.43, size = 214, normalized size = 1.06 \[ \frac {70 \, b^{4} \tan \left (d x + c\right )^{9} + 315 \, a b^{3} \tan \left (d x + c\right )^{8} + 540 \, a^{2} b^{2} \tan \left (d x + c\right )^{7} + 180 \, b^{4} \tan \left (d x + c\right )^{7} + 420 \, a^{3} b \tan \left (d x + c\right )^{6} + 840 \, a b^{3} \tan \left (d x + c\right )^{6} + 126 \, a^{4} \tan \left (d x + c\right )^{5} + 1512 \, a^{2} b^{2} \tan \left (d x + c\right )^{5} + 126 \, b^{4} \tan \left (d x + c\right )^{5} + 1260 \, a^{3} b \tan \left (d x + c\right )^{4} + 630 \, a b^{3} \tan \left (d x + c\right )^{4} + 420 \, a^{4} \tan \left (d x + c\right )^{3} + 1260 \, a^{2} b^{2} \tan \left (d x + c\right )^{3} + 1260 \, a^{3} b \tan \left (d x + c\right )^{2} + 630 \, a^{4} \tan \left (d x + c\right )}{630 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 75.92, size = 236, normalized size = 1.17 \[ \frac {-a^{4} \left (-\frac {8}{15}-\frac {\left (\sec ^{4}\left (d x +c \right )\right )}{5}-\frac {4 \left (\sec ^{2}\left (d x +c \right )\right )}{15}\right ) \tan \left (d x +c \right )+\frac {2 a^{3} b}{3 \cos \left (d x +c \right )^{6}}+6 a^{2} b^{2} \left (\frac {\sin ^{3}\left (d x +c \right )}{7 \cos \left (d x +c \right )^{7}}+\frac {4 \left (\sin ^{3}\left (d x +c \right )\right )}{35 \cos \left (d x +c \right )^{5}}+\frac {8 \left (\sin ^{3}\left (d x +c \right )\right )}{105 \cos \left (d x +c \right )^{3}}\right )+4 a \,b^{3} \left (\frac {\sin ^{4}\left (d x +c \right )}{8 \cos \left (d x +c \right )^{8}}+\frac {\sin ^{4}\left (d x +c \right )}{12 \cos \left (d x +c \right )^{6}}+\frac {\sin ^{4}\left (d x +c \right )}{24 \cos \left (d x +c \right )^{4}}\right )+b^{4} \left (\frac {\sin ^{5}\left (d x +c \right )}{9 \cos \left (d x +c \right )^{9}}+\frac {4 \left (\sin ^{5}\left (d x +c \right )\right )}{63 \cos \left (d x +c \right )^{7}}+\frac {8 \left (\sin ^{5}\left (d x +c \right )\right )}{315 \cos \left (d x +c \right )^{5}}\right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.33, size = 193, normalized size = 0.96 \[ \frac {42 \, {\left (3 \, \tan \left (d x + c\right )^{5} + 10 \, \tan \left (d x + c\right )^{3} + 15 \, \tan \left (d x + c\right )\right )} a^{4} + 36 \, {\left (15 \, \tan \left (d x + c\right )^{7} + 42 \, \tan \left (d x + c\right )^{5} + 35 \, \tan \left (d x + c\right )^{3}\right )} a^{2} b^{2} + 2 \, {\left (35 \, \tan \left (d x + c\right )^{9} + 90 \, \tan \left (d x + c\right )^{7} + 63 \, \tan \left (d x + c\right )^{5}\right )} b^{4} + \frac {105 \, {\left (4 \, \sin \left (d x + c\right )^{2} - 1\right )} a b^{3}}{\sin \left (d x + c\right )^{8} - 4 \, \sin \left (d x + c\right )^{6} + 6 \, \sin \left (d x + c\right )^{4} - 4 \, \sin \left (d x + c\right )^{2} + 1} - \frac {420 \, a^{3} b}{{\left (\sin \left (d x + c\right )^{2} - 1\right )}^{3}}}{630 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 4.28, size = 447, normalized size = 2.22 \[ -\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5\,\left (\frac {152\,a^4}{5}-\frac {96\,a^2\,b^2}{5}+\frac {32\,b^4}{5}\right )+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{13}\,\left (\frac {152\,a^4}{5}-\frac {96\,a^2\,b^2}{5}+\frac {32\,b^4}{5}\right )+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7\,\left (-\frac {288\,a^4}{5}+\frac {1488\,a^2\,b^2}{35}+\frac {384\,b^4}{35}\right )+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{11}\,\left (-\frac {288\,a^4}{5}+\frac {1488\,a^2\,b^2}{35}+\frac {384\,b^4}{35}\right )+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9\,\left (\frac {1076\,a^4}{15}-\frac {2752\,a^2\,b^2}{35}+\frac {6976\,b^4}{315}\right )+2\,a^4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{17}-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,\left (\frac {32\,a^4}{3}-16\,a^2\,b^2\right )-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{15}\,\left (\frac {32\,a^4}{3}-16\,a^2\,b^2\right )+2\,a^4\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,\left (16\,a\,b^3-24\,a^3\,b\right )-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{14}\,\left (16\,a\,b^3-24\,a^3\,b\right )+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8\,\left (32\,a\,b^3-88\,a^3\,b\right )-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}\,\left (32\,a\,b^3-88\,a^3\,b\right )+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6\,\left (\frac {152\,a^3\,b}{3}+\frac {16\,a\,b^3}{3}\right )-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{12}\,\left (\frac {152\,a^3\,b}{3}+\frac {16\,a\,b^3}{3}\right )+8\,a^3\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2-8\,a^3\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{16}}{d\,{\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2-1\right )}^9} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________